import { http } from "@/uni-sub-base/service/request.js"
let serviceName = "Product/"
import { getBaseUrls } from "@/utils/appUrl.js"
//获取商品分类
export function GetProductTypeTree(data) {
    return http.get({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetProductTypeTree",
        data,
    })
}
//获取获取生态圈门店商品列表
export function GetPurchaseStoreProductList(data) {
    return http.get({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetPurchaseStoreProductList",
        data,
    })
}
//获取获取生态圈门店商品列表 - new
export function GetPurchaseStoreProductTypeTree(data) {
    return http.get({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetPurchaseStoreProductTypeTree",
        data,
    })
}
//商品初始化信息
export function InitProductData(path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "InitProductData" + path,
    })
}
//获取商品编码
export function GetMaxProductCode() {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetMaxProductCode",
    })
}
//添加商品保存
export function SaveProduct(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "SaveProduct" + path,
        data,
    })
}
//产品线
export function GetProductLineList() {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetProductLineList",
    })
}
//添加/编辑产品线
export function SaveProductLine(data) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "SaveProductLine",
        data,
    })
}
//删除产品线
export function DeleteProductLines(path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "DeleteProductLines" + path,
    })
}
//获取商品列表
export function GetProductListBySupplier(data) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetProductListBySupplier",
        data,
    })
}
//商品管理入参
export function GetInitSearchData() {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetInitSearchData",
    })
}
//提交审核
export function ApplyProduct(path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "ApplyProduct" + path,
    })
}
//删除
export function DeleteProducts(path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "DeleteProducts" + path,
    })
}

//批量上下架
export function UpdateProductSaleStatus(path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "UpdateProductSaleStatus" + path,
    })
}
//获取会员等级价格
export function GetMemberProductList(path, data) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetMemberProductList" + path,
        data,
    })
}
//获取单条等级价格信息
export function GetMemberProductInfo(path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetMemberProductInfo" + path,
    })
}
//保存
export function SaveMemberProductInfo(data) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "SaveMemberProductInfo",
        data,
    })
}
